package Day6;
/**
 * 2020JavaB真题:车牌
 * https://www.lanqiao.cn/problems/2361/learning/
 */
public class Main4 {
    
    static int[] arr = new int[6];
    static int count;

    public static void main(String[] args) {
        DFS(0);
        System.out.println(count);
    }
    
    static void DFS(int step) {
        if (step == 6) {
            count++;
            return;
        }
        for (int i = 0; i < 16; i++) {
          //当step走到3之后了，它的取值范围就到0-9这个区间了，所以当i==10就要结束
            if (step > 2 && i == 10) return;
            arr[step] = i;
            if (step > 1 && (arr[step] == arr[step - 1] && arr[step] == arr[step - 2])) continue;
            DFS(step + 1);
        }
    }

}